import Mock from 'mockjs'
const { messages, reply, chat } = Mock.mock({
    'messages|4': [{
        id: '@id',
        name: '@cname',
        'content': '@cword(5,20)',
        img: '@image("60x60", "#50B347", "人")',
        'time|1': ['刚才', '6分钟前', '昨天', '@date'],


    }],
    'reply|5': [{
        id: '@id',
        name: '@cname',
        'content': '@cword(5,20)',
        replycontent: '@cparagraph',
        img: '@image("200x100", "#50B347", "Hello")',
        'time|1': ['刚才', '6分钟前', '昨天', '@date'],
        'like': '@boolean',
        isfan: '@boolean'
    }],
    chat: [{
        opposide: '你好，大佬，在吗，在吗？',
        mine: '我在的亲，请问有什么需要帮助的吗？',
        data: '@datetime'
    }, {
        opposide: '大佬是从事互联网产品经理的么，想请教一些问题可以么？',
        data: '@datetime'

    }]
})

Mock.mock('/message/list', 'post', () => {
    return {
        code: 200,
        messages: '获取数据成功',
        data: {
            messages: messages,
        }
    }
})
Mock.mock('/message/chat', 'post', () => {
    return {
        code: 200,
        messages: '获取聊天记录成功',
        data: {
            chat: chat,
        }
    }
})